home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Technical.Notes / IIGS / TN.IIGS.088 < prev    next >
Encoding:
Text File  |  1990-09-21  |  1.5 KB  |  37 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6. Apple IIgs
  7. #88:    The Page One Stack in a 16-Bit World
  8.  
  9. Written by:    Dave Lyons                                      September 1990
  10.  
  11. This Technical Note clarifies the protocol for moving the stack pointer in and 
  12. out of page one.
  13. _____________________________________________________________________________
  14.  
  15. On page 13 of the Apple IIgs Firmware Reference, under "Save the value of the 
  16. native-mode stack pointer," there is a code sample showing how to switch to 
  17. the page-one stack by setting the stack pointer to $01xx, where xx is the 
  18. contents of EMULSTACK at $01/0100.
  19.  
  20. However, the manual does not warn you about moving the stack pointer from page 
  21. one to another area.  When you do that, you must store the low byte of the 
  22. stack pointer at EMULSTACK before moving the stack pointer out of page one.  
  23. If you do not save the page-one stack properly, interrupt routines or some 
  24. toolbox calls may destroy a part of the page one stack that you go back to 
  25. later, expecting that return addresses are still there.
  26.  
  27. Note:  If the auxiliary-memory stack and zero page are in use, you must 
  28.        use $01/0101 instead of $01/0100.  See the Apple IIe Technical 
  29.        Reference Manual, pp. 153-154
  30.  
  31.  
  32. Further Reference
  33. _____________________________________________________________________________
  34.   o  Apple IIgs Firmware Reference
  35.   o  Apple IIe Technical Reference Manual
  36.  
  37.